<!DOCTYPE html>
<html class="x-admin-sm">
    
    <head>
        <meta charset="UTF-8">
        <title>安检柜门列表</title>
        <meta name="renderer" content="webkit">
        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
        <meta name="viewport" content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi" />
        <link rel="stylesheet" href="__HOME_CSS__/font.css">
        <link rel="stylesheet" href="__HOME_CSS__/xadmin.css">
        <script src="__HOME_JS__/echarts.min.js"></script>
        <script src="__HOME_LIB__/layui/layui.js" charset="utf-8"></script>
        <script type="text/javascript" src="__HOME_JS__/xadmin.js"></script>
        <!-- 让IE8/9支持媒体查询，从而兼容栅格 -->
        <!--[if lt IE 9]>
            <script src="__HOME_JS__/html5.min.js"></script>
            <script src="__HOME_JS__/respond.min.js"></script>
        <![endif]-->
    </head>
    <body>
        <div class="x-nav">
                <span class="layui-breadcrumb">
                    <a href="">后台首页</a>
                    <a href="">检修设备列表</a>
                    <a>
                        <cite>安全柜门列表</cite></a>
                </span>
            <a class="layui-btn layui-btn-small" style="line-height:1.6em;margin-top:3px;float:right" onclick="location.reload()" title="刷新">
                <i class="layui-icon layui-icon-refresh" style="line-height:30px"></i>
            </a>
        </div>
        <div class="layui-fluid">
            <div class="layui-row">
                <button class="layui-btn" onclick="xadmin.open('新增安检柜门','{:url('index/securitycheck/add_overhaul_door')}',600,600)"><i class="layui-icon"></i>新增安检柜门</button>

                <div class="layui-card-body layui-table-body layui-table-main">
                    <table class="layui-table layui-form">
                        <thead>
                        <tr>
                            <th>所属柜体</th>
                            <th>柜门编号</th>
                            <th>设备数量</th>
                            <th>设备编号</th>
                            <th>设备安检日期</th>
                            <th>操作</th>
                        </thead>
                        <tbody>
                        {volist name='row' id='vo'}
                        <tr>
                            <td>{$vo.gear_serial}</td>
                            <td>{$vo.door_serial}</td>
                            <td>{$vo.dev_num}</td>
                            <td>{$vo.dev_list}</td>
                            <td>{$vo.check_time}</td>
                            <td>
                                <a title="删除"  onclick="member_del(this,{$vo.door_id})" href="javascript:;">
                                    <i class="layui-icon">取消安全柜</i>
                                </a>
                            </td>
                        </tr>
                        {/volist}
                        </tbody>
                    </table>
            </div>
        </div>
        </div>
        <script>
            /*完成安全检查*/
            function member_del(obj, id) {
                layer.confirm('确定取消取消安检柜吗？',
                    function () {
                        $.ajax({
                            url: "{:url('index/securitycheck/cancel_overhaul_door')}",
                            type: "POST",
                            sync: false,
                            data: {
                                ids: id
                            },
                            success: function (ret) {
                                if (ret.code === 0) {
                                    $(obj).parents("tr").remove();
                                    layer.msg(ret.msg, {
                                        icon: 1,
                                        time: 1500
                                    });
                                } else {
                                    layer.msg(ret.msg, {
                                        icon: 0,
                                        time: 2000
                                    });
                                }
                            }
                        })
                    }
                );
            }

        </script>
    </body>

</html>